<?php
include('config.php');
$name = isset($_POST['name']) ? trim($_POST['name']) : '';
$number = isset($_POST['number']) ? trim($_POST['number']) : '';
$info = isset($_POST['info']) ? $_POST['info'] : '';
$time = time();
$sql = "INSERT INTO  `mz`.`guest` (`guest_id` ,`guest_tel` ,`guest_info` ,`guest_state` ,`guest_name` ,`create_time`) VALUES (NULL ,
 '{$number}',  '{$info}',  '0',  '{$name}',  '{$time}');";

$res = $mysql->selectlist("guest"," guest_tel='{$number}'");
if($res){
	echo 0;
}else{
	$rs = $mysql->execute($sql);
	echo 1;
}

?>